package net.entelijan.cobean.examples.showcase.bind;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import net.entelijan.cobean.examples.showcase.bind.combobox.ComboBoxPanel;
import net.entelijan.cobean.examples.showcase.bind.table.MasterDetailTablePanel;
import net.entelijan.cobean.examples.showcase.bind.table.TablePanel;
import net.entelijan.cobean.examples.showcase.bind.text.DoubleBindTextPanel;
import net.entelijan.cobean.examples.showcase.bind.text.PathBindPanel;
import net.entelijan.cobean.examples.showcase.bind.text.TextPanel;
import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.miginfocom.swing.MigLayout;

public class CobeanBindShowcasePanel extends JPanel {

	private ComboBoxPanel comboBoxPanel = new ComboBoxPanel();

	private TablePanel tablePanel = new TablePanel();

	private MasterDetailTablePanel masterDetailTablePanel = new MasterDetailTablePanel();

	private TextPanel textPanel = new TextPanel();

	private PathBindPanel pathBindPanel = new PathBindPanel();

	private DoubleBindTextPanel doubleBindTextPanel = new DoubleBindTextPanel();

	private static final long serialVersionUID = 1L;

	public CobeanBindShowcasePanel() {
		super();
		setLayout(new MigLayout());
		JTabbedPane tp = new JTabbedPane(JTabbedPane.LEFT);
		{
			JTabbedPane tabbed = new JTabbedPane(JTabbedPane.TOP);
			tabbed.add(textPanel, "Single Binding");
			tabbed.add(doubleBindTextPanel, "Double Binding");
			tabbed.add(pathBindPanel, "Path Binding");
			tp.add(tabbed, "Text");

		}
		{
			JTabbedPane tabbed = new JTabbedPane(JTabbedPane.TOP);
			tabbed.add(tablePanel, "Table");
			tabbed.add(masterDetailTablePanel, "Master Detail");
			tp.add(tabbed, "Table");

		}
		tp.add(comboBoxPanel, "Combo Box");
		add(ExamplesUtil.createIconLabel("showcase-bind.png"), "wrap");
		add(tp, "w max, h max");
	}

	public ComboBoxPanel getComboBoxPanel() {
		return comboBoxPanel;
	}

	public void setComboBoxPanel(ComboBoxPanel comboBoxPanel) {
		this.comboBoxPanel = comboBoxPanel;
	}

	public TablePanel getTablePanel() {
		return tablePanel;
	}

	public void setTablePanel(TablePanel tablePanel) {
		this.tablePanel = tablePanel;
	}

	public TextPanel getTextPanel() {
		return textPanel;
	}

	public void setTextPanel(TextPanel textPanel) {
		this.textPanel = textPanel;
	}

	public DoubleBindTextPanel getDoubleBindTextPanel() {
		return doubleBindTextPanel;
	}

	public void setDoubleBindTextPanel(DoubleBindTextPanel doubleBindTextPanel) {
		this.doubleBindTextPanel = doubleBindTextPanel;
	}

	public MasterDetailTablePanel getMasterDetailTablePanel() {
		return masterDetailTablePanel;
	}

	public void setMasterDetailTablePanel(
			MasterDetailTablePanel masterDetailTablePanel) {
		this.masterDetailTablePanel = masterDetailTablePanel;
	}

	public PathBindPanel getPathBindPanel() {
		return pathBindPanel;
	}

	public void setPathBindPanel(PathBindPanel pathBindPanel) {
		this.pathBindPanel = pathBindPanel;
	}

}
